//////#include<iostream>
//////#include<cstring>
//////using namespace std;
//////struct ListNode {
//////    int val;
//////    ListNode* next;
//////    ListNode() : val(0), next(nullptr) {}
//////    ListNode(int x) : val(x), next(nullptr) {}
//////    ListNode(int x, ListNode* next) : val(x), next(next) {}
//////};
//////ListNode* swapPairs(ListNode* head)
//////{
//////
//////    if (head == NULL)
//////    {
//////        return head;
//////    }
//////    if (head->next == NULL)
//////    {
//////        return head;
//////    }
//////    int i = 0;
//////    ListNode* pw = head;
//////    while (pw != nullptr)
//////    {
//////        i++;
//////        pw = pw->next;
//////    }
//////    ListNode* ne = head->next;
//////    ListNode* pe = ne->next;
//////    ListNode* per = head;
//////    if (i % 2 == 0)
//////    {
//////        while (pe != NULL)
//////        {
//////            if (ne->next != NULL)
//////            {
//////                per->next = ne->next->next;
//////            }
//////            else
//////            {
//////                per = ne->next;
//////            }
//////            if (per == head)
//////            {
//////                head = ne;
//////            }
//////            ne->next = per;
//////            per = pe;
//////            ne = pe->next;
//////            pe = ne->next;
//////        }
//////        per->next = ne->next;
//////        ne->next = per;
//////        if (per == head)
//////        {
//////            head = ne;
//////        }
//////    }
//////    else {
//////        while (pe->next != NULL)
//////        {
//////            if (ne->next != NULL)
//////            {
//////                per->next = ne->next->next;
//////            }
//////            else
//////            {
//////                per = ne->next;
//////            }
//////            if (per == head)
//////            {
//////                head = ne;
//////            }
//////            ne->next = per;
//////            per = pe;
//////            ne = pe->next;
//////            pe = ne->next;
//////        }
//////        per->next = ne->next;
//////        ne->next = per;
//////        if (per == head)
//////        {
//////            head = ne;
//////        }
//////    }
//////    return head;
//////}
//////int main()
//////{
//////    ListNode* head = (ListNode*)malloc(sizeof(ListNode));
//////    ListNode* newnode1 = new ListNode(2);
//////    head->val = 1;
//////    ListNode* newnode2 = new ListNode(3);
//////    ListNode* newnode3 = new ListNode(4);
//////    ListNode* newnode4 = new ListNode(5);
//////    ListNode* newnode5 = new ListNode(6);
//////    ListNode* newnode6 = new ListNode(7);
//////    ListNode* newnode7 = new ListNode(8);
//////    ListNode* newnode8 = new ListNode(9);
//////    ListNode* newnode9 = new ListNode(10);
//////    head->next = newnode1;
//////    newnode1->next = newnode2;
//////    newnode2->next = newnode3;
//////    newnode3->next = newnode4;
//////    newnode4->next = newnode5;
//////    newnode5->next = newnode6;
//////    newnode6->next = newnode7;
//////    newnode7->next = newnode8;
//////    newnode8->next = newnode9;
//////    ListNode* ne = swapPairs(head);
//////    while (ne != nullptr)
//////    {
//////        cout << ne->val << ' ';
//////        ne = ne->next;
//////    }
//////    return 0;
//////}
////
////
////
////#include<iostream>
////#include<vector>
////#include<algorithm>
////using namespace std;
////int threeSumClosest(vector<int>& nums, int target) {
////    int t = 0;
////    for (int w = 0; w < 3; w++)
////    {
////        int l = 0;
////        int r = nums.size() - 1;
////        sort(nums.begin(), nums.end());
////        while (r - l > 1)
////        {
////            int mid = (l + r) >> 1;
////            if (nums[mid] <= target)
////            {
////                l = mid;
////            }
////            else
////            {
////                r = mid;
////            }
////        }
////        if (abs(target - nums[l]) > abs(target - nums[r]))
////        {
////            t += nums[r];
////            cout << nums[r] << ' ';
////            int p = nums[r];
////            nums[r] = nums[nums.size() - 1];
////            nums[nums.size() - 1] = nums[r];
////            nums.pop_back();
////        }
////        else {
////            t += nums[l];
////            int p = nums[l];
////            cout << p << ' ';
////            nums[l] = nums[nums.size() - 1];
////            nums[nums.size() - 1] = nums[l];
////            nums.pop_back();
////        }
////    }
////    return t;
////}
////int main()
////{
////    vector<int>nums;
////    int n = 0;
////    cin >> n;
////    for (int i = 0; i < n; i++)
////    {
////        int a = 0;
////        cin >> a;
////        nums.push_back(a);
////    }
////    int target;
////    cin >> target;
////    int t=threeSumClosest(nums, target);
////    //cout << t;
////    return 0;
////}
//
//
//
//
//
//#include<iostream>
//using namespace std;
//template <typename T>
//void swap(T& a, T& b)
//{
//
//}
//int main()
//{
//
//
//
//
//	return 0;
//}